﻿using System;
using System.Collections.Generic;
using System.Text;
using AMS.DataAccess.Filter;
using AMS.DataAccess.Sys.BO;

namespace AMS.DataAccess.Sys.Filters
{
    public class UserFilter
    {
        public StringFilterField LoginName { get; set; }
        public StringFilterField Name { get; set; }
        public StringFilterField WorkNumber { get; set; }
        public EnumFilterField<SexEnum> Sex { get; set; }
        /// <summary>
        /// 是否获取系统用户，默认不获取
        /// </summary>
        public bool QuerySysUser { get; set; }
        /// <summary>
        /// 是否获取无效的用户，默认不获取
        /// </summary>
        public bool QueryInactiveUser { get; set; }
        /// <summary>
        /// 是否商标代理人
        /// </summary>
        public BooleanFilterField IsTrademarkAttoney { get; set; }
        /// <summary>
        /// 是否专利代理人
        /// </summary>
        public BooleanFilterField IsPatentAttoney { get; set; }

        public bool IsFiltered()
        {
            return LoginName != null || Name != null || WorkNumber != null || IsTrademarkAttoney != null
                || IsPatentAttoney != null || QueryInactiveUser || QuerySysUser
                || Sex != null;
        }

    }
}
